<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" type="text/css" href="easyui-1.4.4/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="easyui-1.4.4/themes/icon.css">
    <script src="easyui-1.4.4/jquery.min.js"></script>
    <script src="easyui-1.4.4/jquery.easyui.min.js"></script>
    <script src="./easyui_extension.js"></script>

</head>
<body>
<form id="form">
    <select class="easyui-combobox" name="sex" data-options="width:100,panelHeight:72,editable:false,required:true">
        <option value="" selected="selected">-- 请选择 --</option>
        <option value="男">男</option>
        <option value="女">女</option>
    </select>
    <select class="easyui-combobox" name="sex"
            data-options="width:100,panelHeight:72,validType:'valueRequired',editable:false,required:true">
        <option value="" selected="selected">-- 请选择 --</option>
        <option value="0">男</option>
        <option value="1">女</option>
    </select>
    <select class="easyui-combobox" data-options="required:true,prompt:'Select Type',value:''" name="type">
        <option value="0">Initial Assessment</option>
        <option value="1">Pre-Test</option>
        <option value="2">Assessment</option>
    </select>
    <button onclick="return validate()">提交</button>
</form>


<script>

    function onSelect(param) {
        console.info("参数长度为: " + arguments.length);
        for (var item in arguments) {
            console.log(arguments[item]);
        }
    }
    function validate() {
        var re = $("#form").form('validate');
        if (re) {
            $.messager.show({title: '成功', msg: '成功', timeout: 2000, showType: 'slide'});
        } else {
            $.messager.show({title: '失败', msg: '失败', timeout: 2000, showType: 'slide'});
        }
        return re;
    }
</script>
</body>
</html>